<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>${baseInfo.tableComment}基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/systemStatic/style/admin.css">
    <link rel="stylesheet" href="${ctx}/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/css/public.css">
    <link rel="stylesheet" href="${ctx}/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
    <style>
        .layui-input-block, .textInput {
            float: left;
            width: 81% !important;
            margin-left: 0;
        }

        .input-right {
            width: 81% !important;
        }

        .textLabel, .dateLabel {
            width: 19% !important;
            text-align: right;
            padding-right: 10px;
            box-sizing: border-box;
        }

        .textLabelCol1 {
            width: 9.5%;
            text-align: right;
            padding-right: 10px;
            box-sizing: border-box;
        }

        .textAreaInput, .doNotDelThisDiv {
            width: 90.5%;
        }

        .uploadFileList > span {
            display: block;
        }
    </style>
</head>
<body style="background-color:#FFF">

<script type="text/html" template>
    <form class="layui-form"
          requrl="<#noparse>{{</#noparse> serverPath.basePath }}/${baseInfo.moduleName}/${baseInfo.classForPrefix}/get"
          style="padding: 0px 30px" lay-filter="${baseInfo.classForPrefix}DataForm">

        <div style="overflow: auto;">
        <#assign colIndex=0>
        <#assign index=0>
        <#assign rowSize=codeGenConf.rowSize>
        <#assign colSize=codeGenConf.colSize>
        <#assign columnSize=codeGenConf.columnSize>

            <table class="temTable tableExcel">
                <tbody request="template/table">
                <#list 0..rowSize-1 as i>
                <tr class="temSpace" request="template/table">
                    <#list 0..columnSize as col>
                        <td class="dragInfo temSpace" colspan="1" rowspan="1">
                            <label class="dateLabel" style=" float: left;"
                                   title="${baseInfo.showColumns[index].columnComment!}">${baseInfo.showColumns[index].columnComment!}</label>
                            <input type="text" name="${baseInfo.showColumns[index].attrNameForProperty}"
                                   placeholder="请输入${baseInfo.showColumns[index].columnComment!}"
                                   autocomplete="off"
                                   class="layui-input <#if baseInfo.showColumns[index].attrType?? && baseInfo.showColumns[index].attrType == 'Date'>dateTimeFiled input-right  time-init<#else> textInput</#if>"
                                   maxlength="50" fieldname="${baseInfo.showColumns[index].attrNameForProperty}" disabled>
                        </td>
                        <#assign lastData=index == columnSize -1>
                        <#assign index=index+1>
                        <#assign colIndex=colIndex+1>
                        <#if colIndex % colSize == 0><#break /></#if>
                        <#if lastData><#break /></#if>
                    </#list>
                </tr>
                </#list>
                </tbody>
            </table>


        <#if hideColumnSize>
            <#assign hideIndex=0>
            <#assign hideColIndex=0>
            <#assign hideRowSize=codeGenConf.hideRowSize>
            <#assign hideColumnSize=codeGenConf.hideColumnSize>
            <#list 0..hideRowSize-1 as i>
                <div class="layui-form-item layui-row" style="display: none;">
                    <#list 0..hideColumnSize as col>
                        <div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
                            <label class="layui-form-label">${baseInfo.hideColumns[hideIndex].columnComment!}</label>
                            <div class="layui-input-block">
                                <input type="text" name="${baseInfo.hideColumns[hideIndex].attrNameForProperty}"
                                       placeholder="请输入${baseInfo.hideColumns[hideIndex].columnComment!}"
                                       autocomplete="off"
                                       class="layui-input <#if baseInfo.hideColumns[hideIndex].attrType?? && baseInfo.hideColumns[hideIndex].attrType == 'Date'>dateTimeFiled time-init</#if>"
                                       maxlength="50"
                                       fieldname="${baseInfo.hideColumns[hideIndex].attrNameForProperty}" disabled>
                            </div>
                        </div>
                        <#assign lastData=hideIndex == hideColumnSize -1>
                        <#assign hideIndex=hideIndex+1>
                        <#assign hideColIndex=hideColIndex+1>
                        <#if hideColIndex % colSize == 0><#break /></#if>
                        <#if lastData><#break /></#if>
                    </#list>
                </div>
            </#list>
        </#if>

            <div class="layui-form-item btnformItem">
                <div>
                    <button type="reset" id="closeWindow" style="margin-left: 10px;" class="layui-btn btn-n layui-btn-danger btn-save">取消</button>
                </div>
            </div>
        </div>
    </form>
</script>
<script src="${ctx}/public/component.js" type="text/javascript"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>

    layui.config({
        base: serverPath.formPath + staticPath.formPath //静态资源所在路径
    }).extend({
        index: 'index' //主入口模块
    }).use(['index', 'common', 'laydate', 'jquery', 'commons', 'ice'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var commons = layui.commons;
        var ice = layui.ice;
        var dateTimeFiledLen = $(".dateTimeFiled");
        for (var i = 0; i < dateTimeFiledLen.length; i++) {
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                , type: 'date'
                , trigger: 'click'
            });
        }

        var defProps = {
            //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
            viewMould: 'moulds/', // 组件模块 存放文件 *****
            initCss: [
                'style/forms/template/tag',
                'style/forms/template/text',
                'style/forms/template/table',
                'style/forms/template/textArea',
                'style/forms/template/radioOption',
                'style/forms/template/date',
                'style/forms/template/button',
                'style/forms/template/uploadFile',
                'style/forms/template/richText',
                'style/forms/template/select',
                'style/forms/template/checkOption',
                'style/forms/template/dataLexi',
                'style/forms/template/uploadImg',
                'style/forms/template/selector',
                'style/forms/formDevise',
                'style/forms/dragLay',
                'style/forms/formPreview'
            ]
        };
        // init 模板部分渲染
        ice.loadCss(defProps.initCss);

    <#if baseInfo.selectOpenMode?? && baseInfo.selectOpenMode>
        //关闭当前页面
        $("#closeWindow").click(function () {
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        });
    <#else>
        //关闭当前页面
        $("#closeWindow").click(function () {
            window<#if baseInfo.showFull?? && baseInfo.showFull>.parent</#if>.location.href = serverPath.basePath + '/${baseInfo.moduleName}/${baseInfo.classForPrefix}/view/list';
        });
    </#if>

        var runId = "<#noparse>${runId}</#noparse>";
        if (runId == null || runId == '') {
            $("#hideAndShow").show();
        }

        var common = layui.common;
        var index = parent<#if baseInfo.showFull?? && baseInfo.showFull>.parent</#if>.layer.getFrameIndex(window.name);
        common.updateForm({
            name: '${baseInfo.classForPrefix}DataForm',
            idValue: "<#noparse>${</#noparse>${baseInfo.primaryKey.attrNameForProperty}}",
            primary: "${baseInfo.primaryKey.attrNameForProperty}"
        });
    });
</script>
</body>
</html>